#ifndef SDREDIS_HELPER
#define SDREDIS_HELPER

#include <string>
#include <list>

#include "SDCommon.h"
#include "sw/redis++/redis++.h"
#define REDIS_TIMEDOUT_MS 300
std::string redisXXGetStringLock(std::shared_ptr<sw::redis::Redis> redis,std::string lock,std::string key,std::string def = "");
void  redisXXSetStringLock(std::shared_ptr<sw::redis::Redis> redis,std::string lock,std::string key,std::string value);
void  redisXXListRPushLock(std::shared_ptr<sw::redis::Redis> redis,std::string lock,std::string key,std::string value);
void  redisXXDeleteLock(std::shared_ptr<sw::redis::Redis> redis,std::string lock,std::string key);
void  redisXXListAllLock(std::shared_ptr<sw::redis::Redis> redis,std::string lock,std::string key,std::vector<std::string>& vec, bool del = false);
void  redisXXHashSetFieldLock(std::shared_ptr<sw::redis::Redis> redis,std::string lock,std::string key,std::string field,std::string value);
void  redisXXHashDelFieldLock(std::shared_ptr<sw::redis::Redis> redis,std::string lock,std::string key,std::string field);
std::string  redisXXHashGetFieldLock(std::shared_ptr<sw::redis::Redis> redis,std::string lock,std::string key,std::string filed,std::string def = "");
void redisXXHashGetAllFieldLock(std::shared_ptr<sw::redis::Redis> redis,std::string lock,std::string key,std::unordered_map<std::string, std::string> &m);
#endif
